// pages/product-consultation/product-consultation.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    questionList:[]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.getQuestionList()
  },
  callTel: function () {
    wx.makePhoneCall({
      phoneNumber: '4008866618'
    })
  },
// 获取常见问题列表
  getQuestionList: function () {
    var that = this
    wx.showLoading({
      title: '加载中',
    })
    wx.request({
      url: 'https://miniapp.odeman.com/summercamp/order_list2.php', 
      header: {
        'content-type': 'application/json' // 默认值
      },
      success(res) {
        wx.hideLoading()
        console.log(res)
        var data = res.data
        console.log(data)
        if (data.status == "success") {
          that.setData({
            questionList: data.list
          })
        }
      }
    })
  }
})